<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <link href="../../style.css" rel="stylesheet" type="text/css">
    <link rel="icon" href="../../images/PETSc_RGB-logo.png" type="image/png" sizes="16x16">
    <title>PETSc: Documentation: Changes: 3.7</title>
  </head>
  <body>

    <div id="logo">
      <h1>PETSc</h1>
    </div>

    <div id="header">
      <h1><!--begin-->Documentation: Changes: 3.7<!--end--></h1>
    </div>

    <hr>

    <div id="sidebar">
      <ul>
        <li><a href="../../index.html">Home</a></li>
        <li><a href="../../download/index.html">Download</a></li>
        <li><a href="../../features/index.html">Features</a></li>
        <li>
          <a href="../../documentation/index.html">Documentation</a>
          <ul>
            <li><a href="../index.html">Manual pages and Users Manual</a></li>
            <li><a href="../referencing.html">Citing PETSc</a></li>
            <li><a href="../tutorials/index.html">Tutorials</a></li>
            <li><a href="../installation.html">Installation</a></li>
            <li><a href="../saws.html">SAWs</a></li>
            <li>
              <a href="index.html">Changes</a>
              <ul>
                <li><a href="dev.html">dev</a></li>
                <li><a href="313.html">3.13</a></li>
                <li><a href="312.html">3.12</a></li>
                <li><a href="311.html">3.11</a></li>
                <li><a href="310.html">3.10</a></li>
                <li><a href="39.html">3.9</a></li>
                <li><a href="38.html">3.8</a></li>
                <li><span class="current">3.7</span></li>
                <li><a href="36.html">3.6</a></li>
                <li><a href="35.html">3.5</a></li>
                <li><a href="34.html">3.4</a></li>
                <li><a href="33.html">3.3</a></li>
                <li><a href="32.html">3.2</a></li>
                <li><a href="31.html">3.1</a></li>
                <li><a href="300.html">3.0.0</a></li>
                <li><a href="233.html">2.3.3</a></li>
                <li><a href="232.html">2.3.2</a></li>
                <li><a href="231.html">2.3.1</a></li>
                <li><a href="230.html">2.3.0</a></li>
                <li><a href="221.html">2.2.1</a></li>
                <li><a href="220.html">2.2.0</a></li>
                <li><a href="216.html">2.1.6</a></li>
                <li><a href="215.html">2.1.5</a></li>
                <li><a href="213.html">2.1.3</a></li>
                <li><a href="212.html">2.1.2</a></li>
                <li><a href="211.html">2.1.1</a></li>
                <li><a href="21.html">2.1.0</a></li>
                <li><a href="2029.html">2.0.29</a></li>
                <li><a href="2028.html">2.0.28</a></li>
                <li><a href="2024.html">2.0.24</a></li>
                <li><a href="2022.html">2.0.22</a></li>
                <li><a href="2018-21.html">2.0.18-21</a></li>
                <li><a href="2017.html">2.0.17</a></li>
                <li><a href="2016.html">2.0.16</a></li>
                <li><a href="2015.html">2.0.15</a></li>
              </ul>
            </li>
            <li><a href="../bugreporting.html">Bug Reporting</a></li>
            <li><a href="../codemanagement.html">Code Management</a></li>
            <li><a href="../faq.html">FAQ</a></li>
            <li><a href="../license.html">License</a></li>
            <li><a href="../linearsolvertable.html">Linear Solver Table</a></li>
            <li><a href="../nonlinearsolvertable.html">Nonlinear Solver Table</a></li>
	    <li><a href="../taosolvertable.html">TAO Solver Table</a></li>
          </ul>
        </li>
        <li><a href="../../publications/index.html">Applications/Publications</a></li>
        <li><a href="../../miscellaneous/index.html">Miscellaneous</a></li>
        <li><a href="../../miscellaneous/external.html">External Software</a></li>
        <li><a href="https://docs.petsc.org/en/latest/developers/index.html">Developers Site</a></li>
      </ul>
    </div>

    <!--begin-->

    <style type="text/css">
      h2 {
        color: red;
      }

      h4 {
        font-weight: bold;
        text-decoration: underline;
      }
    </style>

    <div id="main">

      <div align="center">
        <h2><a name="CHANGES">CHANGES in the PETSc 3.7 Version</a></h2>
      </div>

      <h4>General:</h4>
      <ul>
       <li>-log_summary is deprecated, you should use -log_view</li>
      <li>PetscViewerSetFormat() is deprecated, you should use PetscViewerPushFormat() followed after the viewing with PetscViewerPopFormat()</li>
      <li>PetscMemoryShowUsage() and -memory_info changed to PetscMemoryView() and -memory_view</li>
      <li>PetscOptionsSetValue() may now be called BEFORE PetscInitialize() and any options set then will be used in the initialization process. These options are overwritten by command line options.</li>

      <li>The following routines now take an optional <em>PetscOptions</em> object as the first argument, use NULL to get the previous behavior.

<pre>
PetscOptionsHasName(PetscOptions,const char[],const char[],PetscBool *);
PetscOptionsGetInt(PetscOptions,const char[],const char [],PetscInt *,PetscBool *);
PetscOptionsGetBool(PetscOptions,const char[],const char [],PetscBool  *,PetscBool *);
PetscOptionsGetReal(PetscOptions,const char[],const char[],PetscReal *,PetscBool *);
PetscOptionsGetScalar(PetscOptions,const char[],const char[],PetscScalar *,PetscBool *);
PetscOptionsGetIntArray(PetscOptions,const char[],const char[],PetscInt[],PetscInt *,PetscBool *);
PetscOptionsGetRealArray(PetscOptions,const char[],const char[],PetscReal[],PetscInt *,PetscBool *);
PetscOptionsGetScalarArray(PetscOptions,const char[],const char[],PetscScalar[],PetscInt *,PetscBool *);
PetscOptionsGetBoolArray(PetscOptions,const char[],const char[],PetscBool [],PetscInt *,PetscBool *);
PetscOptionsGetString(PetscOptions,const char[],const char[],char[],size_t,PetscBool *);
PetscOptionsGetStringArray(PetscOptions,const char[],const char[],char*[],PetscInt*,PetscBool *);
PetscOptionsGetEList(PetscOptions,const char[],const char[],const char*const*,PetscInt,PetscInt*,PetscBool *);
PetscOptionsGetEnum(PetscOptions,const char[],const char[],const char*const*,PetscEnum*,PetscBool *);
PetscOptionsGetEnumArray(PetscOptions,const char[],const char[],const char*const*,PetscEnum*,PetscInt *,PetscBool *);
PetscOptionsSetAlias(PetscOptions,const char[],const char[]);
PetscOptionsSetValue(PetscOptions,const char[],const char[]);
PetscOptionsClearValue(PetscOptions,const char[]);
PetscOptionsAllUsed(PetscOptions,PetscInt*);
PetscOptionsUsed(PetscOptions,const char *,PetscBool*);
PetscOptionsView(PetscOptions,PetscViewer);
PetscOptionsInsert(PetscOptions,int*,char ***,const char[]);
PetscOptionsInsertFile(MPI_Comm,PetscOptions,const char[],PetscBool );
PetscOptionsInsertString(PetscOptions,const char[]);
PetscOptionsPrefixPush(PetscOptions,const char[]);
PetscOptionsReject(PetscOptions,const char[],const char[]);
PetscOptionsGetAll(PetscOptions,char*[]);
</pre></li>
      <li>PetscLogBegin() is now PetscLogDefaultBegin().</li>
      </ul>

      <h4>Configure/Build:</h4>
      <ul>
        <li>Added --download-packages-dir=directory to support easy use of --download-xxx behind firewalls</li>
        <li>--download-package for externalpackage with a gitrepo will never be stale. Each time configure is invoked - it will do a 'git fetch' and 'git checkout commit-id'. And if the commit-id changes from the previous build - the package will be rebuilt. To prevent this sync [and use previous snapshot] - one can use --download-package-commit=HEAD</li>
        <li>Added --with-libpng/--with-giflib/--with-libjpeg and cooresponding --download versions to support PNG/GIF/JPEG image generation</li>
        <li>Removed support for AfterImage in favor of libpng/GIFLIB/libjpeg</li>
      </ul>

      <h4>IS:</h4>
      <h4>PetscDraw:</h4>
      <ul>
        <li>Added option -draw_cmap to use a named colormap (e.g., hue (default), jet, coolwarm, parula, viridis) in the drawing of contour plots.</li>
        <li>Support for saving images and movies was improved. Support for generating binary PPM images is built-in, but the format is uncompressed and images are large (640x480 pixels ~ 900 KiB). PETSc can optionally generate PNG/GIF/JPEG images using the libpng/GIFLIB/libjpeg packages (configure --with-package/--download-package). These libraries are popular, well maintained, and available through most packages managers (dnf/yum, apt, brew). For most users, PNG images should be enough.</li>
        <li>Added routine PetscDrawSave(), users should explicitly call it to save images after configuring with PetscDrawSetSave().</li>
        <li>The PetscDrawSynchronizedXXX() routines were removed, the corresponding PetscDrawXXX() are now collective.</li>
      </ul>
      <h4>PF:</h4>
      <h4>Vec:</h4>
      <ul>
        <li>For complex numbers VecNorm(v,NORM_1,) will return the traditional 1 norm of the 2 norm of the complex numbers; that is the 1 norm of the absolutely values of the complex entries. Previously it returned the 1 norm of the 1 norm of the complex entries (what is returned by the BLAS routine asum()). Both are valid norms but most people expect the former.</li>
      </ul>
      <h4>VecScatter:</h4>
      <h4>PetscSection:</h4>
      <h4>Mat:</h4>
      <h4>PC:</h4>
      <ul>
        <li>If the DM has a CreateRestriction() function the PCMG automatically uses that to create the restriction operator instead of defaulting to using the transpose of the interpolation</li>
        <li>Added -pc_hypre_boomeramg_nodal_coarsen <n> - where n is from 1 to 6 (see HYPRE_BOOMERAMGSetNodal())</li>
        <li>Added -pc_hypre_boomeramg_vec_interp_variant <v> where v is from 1 to 4 (see HYPRE_BoomerAMGSetInterpVecVariant())</li>
        <li>see PCHYPRE to allow taking advantage of MatSetNearNullSpace() for hypre BoomerAMG</li>
        <li>Added PCTelescope which supports running solvers on sub-communicators. This PC allows re-partitioning of coarse levels solves within PCMG when using Galerkin coarse level operators.</li>
      </ul>
      <h4>KSP:</h4>
      <ul>
        <li>KSPSetMonitor(KSPMonitorXXX, calls now require passing a viewer as the final argument, you can no longer pass a NULL)</li>
        You should replace
<pre>
ierr = KSPMonitorSet(ksp,KSPMonitorDefault,NULL,NULL);CHKERRQ(ierr); </p>
</pre>
        with
 <pre>
PetscViewerAndFormat *vf;
ierr = PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD,PETSC_VIEWER_DEFAULT,&vf);CHKERRQ(ierr);
ierr = KSPMonitorSet(ksp,(PetscErrorCode (*)(KSP,PetscInt,PetscReal,void*))KSPMonitorDefault,vf,(PetscErrorCode (*)(void**))PetscViewerAndFormatDestroy);CHKERRQ(ierr);
 </pre>
        <li>-ksp_monitor_solution now takes arguments of the form [viewertype[:filename[:formatoption]]] allowing viewing the solution in many ways. To get back the previous behavior use -ksp_monitor_solution draw</li>
        <li> A Flexible Conjugate Gradient (FCG) implementation has been added as KSPFCG.
        <li> New implementations for pipelined, flexible Krylov methods have been added as KSPPIPEFGMRES, KSPPIPEFCG, and KSPPIPEGCR.
      </ul>
      <h4>SNES:</h4>
      <ul>
        <li>SNESSetMonitor(SNESMonitorXXX, calls now require passing a viewer as the final argument, you can no longer pass a NULL)</li>
                You should replace
<pre>
ierr = SNESMonitorSet(ksp,SNESMonitorDefault,NULL,NULL);CHKERRQ(ierr); </p>
</pre>
        with
 <pre>
PetscViewerAndFormat *vf;
ierr = PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD,PETSC_VIEWER_DEFAULT,&vf);CHKERRQ(ierr);
ierr = SNESMonitorSet(ksp,(PetscErrorCode (*)(SNES,PetscInt,PetscReal,void*))SNESMonitorDefault,vf,(PetscErrorCode (*)(void**))PetscViewerAndFormatDestroy);CHKERRQ(ierr);
 </pre>
        <li>-snes_monitor_solution/residual/solution_update now takes arguments of the form [viewertype[:filename[:formatoption]]] allowing viewing the solution in many ways. To get back the previous behavior use -ksp_monitor_solution draw</li>
      </ul>
      <h4>SNESLineSearch:</h4>
      <ul>
        <li>-snes_linesearch_monitor now takes an optional [:filename] arguement, changed SNESLineSearchSet/GetMonitor to SNESLineSearchSet/GetDefaultMonitor</li>
        <li>Added SNESLineSearchMonitorSet()</li>
        <li>Partial support for -snes_linesearch_monitor_solution_update</li>
      </ul>
      <h4>TS:</h4>
      <ul>
        <li>You must call TSSetExactFinalTime() or use the option -ts_exact_final_time before calling TSSolve()</li>
        <li>TSSetMonitor(TSMonitorXXX, calls now require passing a viewer as the final argument, you can no longer pass a NULL)</li>
                You should replace
<pre>
ierr = TSMonitorSet(ksp,TSMonitorDefault,NULL,NULL);CHKERRQ(ierr); </p>
</pre>
        with
 <pre>
PetscViewerAndFormat *vf;
ierr = PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD,PETSC_VIEWER_DEFAULT,&vf);CHKERRQ(ierr);
ierr = TSMonitorSet(ksp,(PetscErrorCode (*)(TS,PetscInt,PetscReal,Vec,void*))TSMonitorDefault,vf,(PetscErrorCode (*)(void**))PetscViewerAndFormatDestroy);CHKERRQ(ierr);
 </pre>
<li>-ts_monitor_solution now takes arguments of the form [viewertype[:filename[:formatoption]]] allowing viewing the solution in many ways. To get back the previous behavior use -ksp_monitor_solution draw</li>
        <li>-ts_monitor_binary_solution filename should now be written as -ts_monitor_solution binary:filename</li>
        <li>Renamed TSSetEventMonitor() to TSSetEventHandler(). Updated many TS implementations to support event detection.</li>
        <li>Updated TSTHETA, TSBEULER, and TSCN to support time adaptivity by estimating the local truncation error with a BDF-2 formula.</li>
        <li>Updated TSALPHA implementation. Removed TSAlphaSetAdapt() and TSAlphaAdaptDefault(), use TSAlphaUseAdapt() instead.</li>
        <li>Added TSBDF, an implementation of backward difference formulas using constant order (1 to 6) and supporting time adaptivity.</li>
        <li>Implemented new interface for second-order systems to avoid using a first-order system formulation. Added TSALPHA2 implementation (generalized-alpha, Chung &amp Hubert 1993) featuring user-controlled damping of high-frequency modes and time adaptivity through a BDF-2 formula.</li>
      </ul>
      <h4>DM/DA:</h4>
      <ul>
        <li>Added DMShellSetCreateRestriction</li>
        <li>Added the generic option prefix interfaces: DMGetOptionsPrefix(), DMAppendOptionsPrefix()</li>
        <li>DMLabel labels are now available to all DM objects, not just DMPlex object</li>
        <li>DMClone() now handles copying the coordinates, so that DMCopyCoordinates() is no longer necessary</li>
      </ul>
      <h4>DMPlex:</h4>
      <h4>PetscViewer:</h4>
      <ul>
        <li>Replaced PetscViewerASCIISynchronizedAllow() with PetscViewerASCIIPushSynchronized() PetscViewerASCIIPopSynchronized()</li>
      </ul>
      <h4>SYS:</h4>
      <h4>Tao:</h4>
      <ul>
        <li>Removed convergence tolerances -tao_fatol and tao_frtol also remove these two parameters from TAOSetTolerance() and TaoGetTolerance()</li>
      </ul>
      <h4>AO:</h4>
      <h4>Sieve:</h4>
      <h4>Fortran:</h4>
    </div>

    <!--end-->

    <hr>

  </body>
</html>
